package com.jming.jike.service.front;

import com.jming.jike.dto.front.AddressBookDTO;
import com.jming.jike.vo.TreeNode;
import com.jming.jike.vo.front.AddressBookVO;
import com.jming.jike.vo.front.RegionVO;

import java.util.List;

/**
 * @author jinming.zhang
 * @version 0.0.1
 * @date 2022/04/16
 */
public interface AddressBookService {


    /**
     * 新增地址
     *
     * @param addressBookDTO
     * @return Boolean
     * @Author jinming.zhang
     * @Date 2022/5/16
     */
    Boolean insert(AddressBookDTO addressBookDTO);

    /**
     * 修改地址
     *
     * @param addressBookDTO
     * @return Boolean
     * @Author jinming.zhang
     * @Date 2022/5/18
     */
    Boolean update(AddressBookDTO addressBookDTO);

    /**
     * 删除地址
     *
     * @param id
     * @return Boolean
     * @Author jinming.zhang
     * @Date 2022/5/18
     */
    Boolean delete(Long id);

    /**
     * 获取地址列表
     *
     * @param
     * @return List<AddressBookVO>
     * @Author jinming.zhang
     * @Date 2022/5/18
     */
    List<AddressBookVO> queryList();

    /**
     * 地址详情
     *
     * @param id
     * @return AddressBookVO
     * @Author jinming.zhang
     * @Date 2022/5/18
     */
    AddressBookVO addressBookDetail(Long id);

    /**
     * 获取地区树
     *
     * @param
     * @return List<TreeNode < RegionVO>>
     * @Author jinming.zhang
     * @Date 2022/5/18
     */
    List<TreeNode<RegionVO>> getRegionTree();
}
